package com.ocean.controller.edu;

import com.ocean.entity.edu.Student;
import com.ocean.entity.edu.TClass;
import com.ocean.service.edu.StudentService;
import com.ocean.service.edu.TClassService;
import com.ocean.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author greenbird
 * @create 2023-03-04 15:41
 */
@RestController
@RequestMapping("/api/edu/tclass/")
public class TClassController {
    @Autowired
    private TClassService service;

    @PostMapping("save.do")
    public R save(@RequestBody TClass obj){
        return service.save(obj);
    }
    @PostMapping("update.do")
    public R update(@RequestBody TClass obj){
        return service.update(obj);
    }
    @GetMapping("del.do")
    public R delete(int id){
        return service.delete(id);
    }
    @GetMapping("page.do")
    public R page(String classname,String classnum,int page,int size){
        return service.queryPage(classname,classnum,page,size);
    }


    @GetMapping("echarts.do")
    public R echarts(){
        return service.queryEcharts();
    }
}

